package com.qolome.order.exception;

import com.qolome.enums.ResultEnum;

import lombok.Getter;

/**
 * @author Qolome
 * @version V1.0
 * @Description 订单异常
 * @date 2020年 01月20日 10:17:19
 */
@Getter
public class OrderException  extends RuntimeException{

    /**
	 * 
	 */
	private static final long serialVersionUID = -5590738819594782127L;
	private Integer code;

    public OrderException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public OrderException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}
